package com.jianneng.jdg.model.homeactivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.LinearLayout;
import android.widget.ListView;

import com.example.com.jianneng.jdg.R;
import com.jianneng.jdg.model.adapter.ReprotMoneyAdapter;
import com.jianneng.jdg.model.gallery.MyWorkerService;

public class HistoryWagesActivity extends BaseActivity {
private ListView mHistoryListView;
private LinearLayout mBack;
private ReprotMoneyAdapter mAdapter;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_history_wages);
		init();
		mAdapter = new ReprotMoneyAdapter(this, MyWorkerService.getReportMoney());
		mHistoryListView.setAdapter(mAdapter);
		mHistoryListView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				Intent intent =new Intent(HistoryWagesActivity.this, HistoryWagesDetailActivity.class);
				startActivity(intent);
				
			}
		});
		mBack.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
				
			}
		});
	}
	private void init() {
		mHistoryListView = (ListView) findViewById(R.id.history_wages_listview);
		mBack = (LinearLayout) findViewById(R.id.history_back);
	}

}
